package org.ytor.core.model;

import lombok.Data;
import org.ytor.core.sqlflow.PersistenceModel;

import java.io.Serial;
import java.io.Serializable;

/**
 * 通用请求对象
 * @param <T> 对应的实体类型
 */
@Data
public abstract class BaseReq<T extends PersistenceModel<T, K>, K> implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**主键id*/
    private String id;

    /**创建者所属部门*/
    private String departCode;

    /**数据备注*/
    private String remark;

    /**数据状态*/
    private Integer status;

    /**
     * REQ类转为实体类
     */
    public abstract T toEntity();
}
